#ifndef __DS1302_H
#define __DS1302_H

#define DS1302_CLK GPIO_Pin_13
#define DS1302_DAT GPIO_Pin_14
#define DS1302_RSE GPIO_Pin_15

#define DS1302_WRITE_WP 0x8E//写保护
#define DS1302_WRITE_YEAR 0x8C
#define DS1302_WRITE_MONTH 0x88
#define DS1302_WRITE_DATE 0x86
#define DS1302_WRITE_HOUR 0x84
#define DS1302_WRITE_MINUTE 0x82
#define DS1302_WRITE_SECOND 0x80
#define DS1302_WRITE_DAY 0x8A

extern uint8_t DS1302_Time[];
void DS1302_Init(void);
void DS1302_DATIN(void);
void DS1302_DATOUT(void);
void DS1302_WriteByte(uint8_t Command,uint8_t Data);
uint8_t DS1302_ReadByte(uint8_t Command);
void DS1302_SetTime(void);//十进制转十六进制
void DS1302_ReadTime(void);//十六进制转十进制
void TimeShow(void);



#endif
